/// CreateTime 2020/7/8 15:45
/// CreateUser chen 
/// ProjectName flutter_elf
import 'package:flutter_elf/config/component_index.dart';

void main(){
  BaseModel model = BaseModel();
  User user = User('userName', 2, 1, 'sSessionKey');
  model.data = user;
  model.msg = '请求信息';
  print(model.toString());
}




class BaseModel{
  String msg;
  dynamic data;

  @override
  String toString() {
    return '{"msg": "$msg", "data": ${data.toString()}}';
  }
}

class User{

  String userName;
  int iUserId;
  int age;
  String sSessionKey;

  User(this.userName, this.iUserId, this.age, this.sSessionKey);

  @override
  String toString() {
    return '{"userName": "$userName", "iUserId": $iUserId, "age": $age, "sSessionKey": "$sSessionKey"}';
  }

}